using System;
using System.Web.UI; 
using System.Web.UI.WebControls; 
using LibreriaCommon; 

namespace LibreriaWC
{
    /// <summary>
    /// Clase que extiende al control TextBox.
    /// </summary>
    [ToolboxData("<{0}:txtLetras runat=server></{0}:txtLetras>")]
    public class txtLetras : txtBase
    {
        protected override void OnPreRender(EventArgs e)
        {
            Attributes.Add("onkeypress", "javascript: if(document.all){ return (event.keyCode >= 65 && event.keyCode <= 90) || (event.keyCode >= 96 && event.keyCode <= 122) || (event.keyCode == 241 || event.keyCode == 209 || event.keyCode == 32) ;} else {return (event.which >= 65 && event.which <= 90) || (event.which >= 96 && event.which <= 122) || (event.which == 241 || event.which == 209 || event.which == 32) || event.which ==8 ||  event.which ==0 ;}");
            base.OnPreRender(e);
        }
    }
}